package org.jeecg.common.oa.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum PendingSubStateEnum {
    /**
     * 处理后状态：0/1/2/3同意已办/不同意已办/取消/驳回
     */

    AGREE (0, "同意已办"),
    NOT_AGREE (1, "不同意已办"),
    CANCEL (2, "取消"),
    OVERRULE(3,"驳回");

    int status;
    String name;

    public static String getName(Integer status){
        if (status == null){
            return null;
        }
        for (PendingSubStateEnum mode : PendingSubStateEnum.values()){
            if (mode.getStatus() == status.intValue()) {
                return mode.name;
            }
        }
        return null;
    }
}
